<?php

namespace app\common\model;

use think\Db;
use think\Model;

class Banner extends Model
{
    /**
     * 根据条件获取列表
     * @param array $where
     * @param int $page
     * @return \think\Paginator
     */
   public function getList($where = [], $page = 15) {
       $data = $this->where($where)->where('delete', 0)->paginate($page);
       return $data;
   }

    /**
     * 根据条件获取品牌
     * @param array $where
     * @return null|static
     */
    public function getBanner($where = []) {
        $where['delete'] = 0;
        return $this->get($where);
    }
}
